package com.wealth.scsj.b_app.view.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toolbar;

import com.wealth.scsj.b_app.R;
import com.wealth.scsj.b_app.utils.SkipUtils;

/**
 * 设置中心
 */
public class SettingActivity extends BaseActivity implements View.OnClickListener {

    private TextView mToolbarTitle;
    private TextView mToolbarTitleLeft;
    /**
     * 编辑
     */
    private TextView mToolbarTitleRight;
    private ImageView mToolbarTitleRifhtImg;
    private Toolbar mToolbar;
    private RelativeLayout mPersonalInformationRl;
    private RelativeLayout mChangePhonenumRl;
    private RelativeLayout mSocialAccountBindingRl;
    private RelativeLayout mLoginPasswordRl;
    private RelativeLayout mPaymentSettingsRl;
    private RelativeLayout mPaymentSettingsRl2;
    private RelativeLayout mLogoutAccountRl;

    @Override
    protected void createView(Bundle savedInstanceState) {
        setContentView(R.layout.activity_setting);

        initToolbar();
        setToolbarTitle("设置中心");
        hasBack(true);

        initView();
    }

    @Override
    protected void initView() {

        mPersonalInformationRl = (RelativeLayout) findViewById(R.id.personal_information_rl);
        mChangePhonenumRl = (RelativeLayout) findViewById(R.id.change_phonenum_rl);
        mSocialAccountBindingRl = (RelativeLayout) findViewById(R.id.social_account_binding_rl);
        mLoginPasswordRl = (RelativeLayout) findViewById(R.id.login_password_rl);
        mPaymentSettingsRl = (RelativeLayout) findViewById(R.id.payment_settings_rl);
        mPaymentSettingsRl2 = (RelativeLayout) findViewById(R.id.payment_settings_rl2);
        mLogoutAccountRl = (RelativeLayout) findViewById(R.id.logout_account_rl);

    }

    @Override
    protected void initListener() {
        mPersonalInformationRl.setOnClickListener(this);
        mChangePhonenumRl.setOnClickListener(this);
        mPaymentSettingsRl2.setOnClickListener(this);

    }

    @Override
    protected void initData() {

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.personal_information_rl:
                 SkipUtils.tochangeShop(this);
                break;
            case R.id.change_phonenum_rl:
                SkipUtils.toChangeLoginPWD(this);
                break;
            case R.id.payment_settings_rl2:
                SkipUtils.toCommBack(this);
                break;
        }
    }
}
